<?php
/**
 * 配置信息
 */


use App\Trip\Train\Seat\SeatConst;
use App\Trip\Weather\WeatherType;

$seats = SeatConst::SEAT_DATA;
return [
    "geo"      => [
        "amap" => [
            "key" => env("AMAP_KEY", ""),
        ],
    ],
    "aes"      => [
        "key" => env("AES_KEY", ''),
        "iv"  => env("AES_IV", ''),
    ],
    "ttl"      => [
        "second"  => 1,
        "minutes" => 60,
        "hour"    => 3600,
        "day"     => 24 * 3600,
        "month"   => 30 * 24 * 3600,
        "year"    => 365 * 24 * 3600,
    ],
    // 火车票配置
    "train"    => [
        "type"               => [
            "G" => "高铁",
            "C" => "高铁",
            "D" => "动车",
            "Z" => "普快",
            "T" => "普快",
            "K" => "普快",
            "0" => "普快", // 若果是数字则用 0/n 或者 n-n => 匹配
            "Y" => "专列",
            "L" => "专列",
        ],
        "select_seats_fee"   => [
            "seat_type" => [
                1 => [
                    "default" => 6, // 选座费 默认6元
                ],
                2 => [
                    "default" => 15, // 选铺 默认15
                ],
            ],
        ],
        "select_seats"       => [
            "G" => [
                "一等座" => $seats["一等座"],
                "二等座" => $seats["二等座"],
                "商务座" => $seats["商务座"],
            ],
            "C" => [
                "一等座" => $seats["一等座"],
                "二等座" => $seats["二等座"],
                "商务座" => $seats["商务座"],
            ],
            "D" => [
                "一等座" => $seats["一等座"],
                "二等座" => $seats["二等座"],
                "商务座" => $seats["商务座"],
            ],
            "Z" => [
                "硬卧" => $seats["硬卧"],
                "软卧" => $seats["软卧"],
            ],
            "T" => [
                "硬卧" => $seats["硬卧"],
                "软卧" => $seats["软卧"],
            ],
            "K" => [
                "硬卧" => $seats["硬卧"],
                "软卧" => $seats["软卧"],
            ],
            "0" => [
                "硬卧" => $seats["硬卧"],
                "软卧" => $seats["软卧"],
            ],
            "Y" => [
                "硬卧" => $seats["硬卧"],
                "软卧" => $seats["软卧"],
            ],
            "L" => [

            ],
        ],
        "ticket_service_fee" => 2.6,
        "change_service_fee" => 25,
        "refund_service_fee" => 25,
    ],
    // 飞机票
    "airplane" => [
        "depart_times"       => [
            '00:00-06:00',
            '06:00-12:00',
            '12:00-18:00',
            '18:00-24:00',
        ],
        // 乘客类型 映射
        "passenger_type_map" => [
            "providers" => [
                // provider => system
                "book51" => [
                    1 => 1, //   成人
                    2 => 3, //   儿童
                    3 => 4,  //   婴儿
                ],
            ],
        ],

        "variflight" => [
            "appid"        => env('VARIFLIGHT_APPID', ''),
            "secret"       => env('VARIFLIGHT_SECRET', ''),
            "comfort"      => [
                "api_url" => "https://open-al.variflight.com/api/happiness",
            ],
            "flight_aware" => [
                "api_url" => "https://open-al.variflight.com/api/flight",
            ],
        ],

    ],
    // 酒店
    "hotel"    => [],
    // 打车
    "tax"      => [],
    // 天气
    "weather"  => [
        "types" => WeatherType::TYPES,
    ],
];